﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;

namespace TooMuchToDo.MiniGames
{
    /// <summary>
    /// handles all the mini games in one unified system
    /// </summary>
    public class MiniGameManager
    {
        //balancing mini game
        private balancing _balancing = new balancing();
        private Arrow _arrow = new Arrow();

        private int _tick = 0;

        public void Load(ContentManager ContentManager)
        {
            _balancing.Load(ContentManager);
            _arrow.Load(ContentManager);
        }

        public void Update()
        {
            _balancing.Update();
            if (_arrow.active) { _arrow.Update(); }
            if (_tick > 1)
            {
                _arrow.active = true;
                _balancing.rightMiniGameInterpilation.GoTo(.6f);
            }
            _tick++;

        }

        public void Draw(SpriteBatch SpriteBatch)
        {
            _balancing.Draw(SpriteBatch);
            if (_arrow.active) { _arrow.Draw(SpriteBatch); }
        }

    }
}
